class Eth::Contracts::OwnedController < ApplicationController
  protect_from_forgery :except => :index

  def index
  end

  def accept_ownership
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Owned.acceptOwnership
    else
      msg = Owned.acceptOwnership(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_accept_ownership => msg)
  end

  def owner
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Owned.owner
    else
      msg = Owned.owner(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_owner => msg)
  end

  def change_owner
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Owned.changeOwner
    else
      msg = Owned.changeOwner(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_change_owner => msg)
  end

  def new_owner
    input_args = params[:contract_input]
    if input_args.nil?
      msg = Owned.newOwner
    else
      msg = Owned.newOwner(*input_args)
    end
    redirect_to url_for(:action => :index, :msg_new_owner => msg)
  end

end
